#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os

proj_env = os.environ.get('QMAP_ENV')
if proj_env == 'production':
    from config.environment import *
else:
    from config.environment_test import *

host_name = 'shitouren'
domain_name = host_name+'.com'

session_secret = 'uIyh3Kv7TWGHrdksrUdumBjBP57KhUEQi6T8lMHfSgc'
passwd_secret = 'Sk4Ys7sPTx+gT5ssPHXV4ieKwPMKB0czjb+2rVfICMo='
cookie_secret = "/NHkbgvLTxOnZosYcuMEIiN+NitBXE3CudkFY3nwGk8="

session_timeout = 2592000
persist_timeout = 0
item_timeout = 600
node_timeout = 600

cookie_ssid = 'shitouren_ssid'
cookie_check = 'shitouren_check'
cookie_verify = 'shitouren_verify'
cookie_ver = 'shitouren_ver'

path_template       = os.path.join(path_template_pfx, 'templates')
path_static         = os.path.join(path_static_pfx, 'static')
path_log            = "/web/logs"
path_lib            = "/web/deploy/lib/"
path_img            = "/data/shitouren/img/"
path_img_failed     = "/data/shitouren/img/failed/"
path_slave_img = "/data/shitouren/slave_img/"
path_map            = "/data/shitouren/map/"
path_map_saved      = "/data/shitouren/map/saved/"
path_map_failed     = "/data/shitouren/map/failed/"
path_fdfs_conf      = "/etc/fdfs/client.conf"
path_seafile_root = "/root/seafile-client"

err_500             = '服务器正在思考人生，请稍后再试'
err_timeout         = '请求超时，请刷新重试'
err_op_fail         = '无法完成此操作'
err_signin_requied  = '使用此功能需要登录'
err_no_api          = '此接口暂未开放'

key_userseq     = 'userid'
key_resetseq    = 'resetid'
key_labelseq    = 'labelid'
key_imgseq      = 'imgid'
key_topicseq = 'topicid'
key_noteseq = 'noteid'
key_messageseq = 'messageid'

yunweiip        = '221.221.177.59'

WX_APPID = 'wx333dc23de3c8e46d'
WX_SECRET = '2680d85ef00c515fd7a266a811c924e6'

WX_SIGNIN_REDIRECT = 'https://open.weixin.qq.com/connect/oauth2/authorize' \
                     + '?appid=' + WX_APPID \
                     + '&redirect_uri=http%3A%2F%2Fwww.shitouren.com%2Fweixin%2Fweb%2Fcallback' \
                     + '&response_type=code' \
                     + '&scope=snsapi_userinfo' \
                     + '&state=krHVypmrn5#wechat_redirect'

